﻿using System.ComponentModel.DataAnnotations;
using ServiceStack.DataAnnotations;

namespace NetSurveillance.WebApp.DataServices.Models
{
    [Alias("WebAppAlertSettings")]
    public class AlertSetting : BaseModel
    {
        [AutoIncrement]
        public long Id { get; set; }

        [Required]
        [Default(typeof(int), "0")]
        public int AlertType { get; set; }

        [StringLength(512)]
        public string AlertEmail { get; set; }

        [StringLength(512)]
        public string AlertPhone { get; set; }

        [Default(typeof(int), "0")]
        public int AlertTimespan { get; set; }

        [Default(typeof(int), "0")]
        public int BaudRate { get; set; }

        [StringLength(32)]
        public string DeviceType { get; set; }

        [StringLength(32)]
        public string SerialPort { get; set; }

        [StringLength(32)]
        public string SmtpServer { get; set; }

        [StringLength(32)]
        public string SmtpAccount { get; set; }

        [StringLength(64)]
        public string SmtpPassword { get; set; }

        [StringLength(128)]
        public string SenderEmail { get; set; }
    }
}